home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / PCI Driver Development Kit / • Tools / Utility / PCISlots / Sources / PCISlotsNameRegistry.cp < prev    next >
Encoding:
Text File  |  1996-08-20  |  4.1 KB  |  139 lines  |  [TEXT/MPS ]

  1. // Copyright © 1995 by Apple Computer, Inc.  All rights reserved.
  2. // PCISlotsNameRegistry.cp
  3.  
  4. /*
  5. FILE
  6.     PCISlotsNameRegistry.cp
  7.  
  8. NAME
  9.     PCI Slot Peek source file
  10.  
  11. DESCRIPTION
  12.     This source file implements the native PPC code NameRegistry functions used by the
  13.     PCI Slot Peek application. It provides the 68K->PPC glue code to the NameRegistry library.
  14.  
  15. MODIFICATION HISTORY
  16.     Created by Terry Teague
  17.  
  18.     20 Apr 95    -    TRT    -    Initial version
  19.     17 Jul 95    -    TRT    -    Tidy-up source for PPCC v1.0.5, Universal Headers v2.0 final,
  20.                                     CodeWarrior 6.1.
  21.  
  22. =============================================================================================
  23. */
  24.  
  25. //================================================================================================
  26. // Build-time #defines
  27. //================================================================================================
  28.  
  29. // pre-Universal Headers (<MPW 3.3.1) compatibility
  30. #ifndef    qPreUniHeaders
  31. #define    qPreUniHeaders        0
  32. #endif
  33.  
  34. //================================================================================================
  35. // Standard Includes
  36. //================================================================================================
  37.  
  38. #include <Types.h>
  39. #include <Packages.h>
  40. #include <Dialogs.h>
  41. #include <Memory.h>
  42. //#if    qPreUniHeaders
  43. //#include <OSEvents.h>
  44. //#endif
  45. #include <QuickDraw.h>
  46. #include <Resources.h>
  47. #include <ToolUtils.h>
  48. #include    <StdIO.h>
  49. #include    <Slots.h>
  50. #include    <ROMDefs.h>
  51. #include    <Devices.h>
  52. #include    <Traps.h>
  53. #include    <String.h>
  54. #include    <Strings.h>
  55. #include    <CType.h>
  56. #if    qPreUniHeaders
  57. #include    <SysEqu.h>
  58. #else
  59. #include    <LowMem.h>
  60. #endif
  61. #include    <Power.h>
  62. #include    <DeskBus.h>
  63.  
  64. // v2.0 final or later
  65. #ifndef __CODEFRAGMENTS__
  66. #include    <CodeFragments.h>
  67. #endif
  68.  
  69. // v2.0a3 or earlier (also kept in v2.0 final for compatibility)
  70. //#ifndef __FRAGLOAD__
  71. //#include    <FragLoad.h>
  72. //#endif
  73.  
  74. #ifndef __MIXEDMODE__
  75. #include    <MixedMode.h>
  76. #endif
  77.  
  78. // v2.0a3 or earlier
  79. #ifdef    __FRAGLOAD__
  80. typedef SInt32 OSStatus;
  81. #endif
  82.  
  83. #ifndef    __NAMEREGISTRY__
  84. #include    <NameRegistry.h>
  85. #endif
  86.  
  87. //================================================================================================
  88. // PCISlots Specific Includes
  89. //================================================================================================
  90.  
  91. #ifndef    __PCISLOTS__
  92. #include    "PCISlots.h"
  93. #endif
  94.  
  95. #ifdef __cplusplus
  96. extern "C" {
  97. #endif
  98.  
  99. #if GENERATINGPOWERPC || defined(powerc) || defined (__powerc)
  100. #pragma options align=mac68k
  101. #endif
  102.  
  103. #ifdef __CFM68K__
  104. #pragma lib_export on
  105. #endif
  106.  
  107. // Routine descriptors will be imported into the 68K application with FindSymbol()
  108.  
  109. RoutineDescriptor    RegistryEntryIterateCreateRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryIterateCreateProcInfo, RegistryEntryIterateCreate);
  110. RoutineDescriptor    RegistryEntryIterateDisposeRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryIterateDisposeProcInfo, RegistryEntryIterateDispose);
  111. RoutineDescriptor    RegistryEntryIterateRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryIterateProcInfo, RegistryEntryIterate);
  112. RoutineDescriptor    RegistryEntryIDDisposeRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryIDDisposeProcInfo, RegistryEntryIDDispose);
  113. RoutineDescriptor    RegistryPropertyGetSizeRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryPropertyGetSizeProcInfo, RegistryPropertyGetSize);
  114. RoutineDescriptor    RegistryPropertyGetRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryPropertyGetProcInfo, RegistryPropertyGet);
  115. RoutineDescriptor    RegistryEntryToPathSizeRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryToPathSizeProcInfo, RegistryEntryToPathSize);
  116. RoutineDescriptor    RegistryCStrEntryToPathRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryCStrEntryToPathProcInfo, RegistryCStrEntryToPath);
  117.  
  118. #if 0
  119. // This code sets up the routine descriptor for the native PPC NameRegistry code
  120. // that is used from a 68K application
  121.  
  122. void InitNativeNameRegistry(void) 
  123. {
  124.     EnumerateNameRegistryUPP = NewRoutineDescriptor((ProcPtr)EnumerateNameRegistry, uppEnumerateNameRegistryProcInfo, GetCurrentISA());
  125. }
  126. #endif
  127.  
  128. #ifdef __CFM68K__
  129. #pragma lib_export off
  130. #endif
  131.  
  132. #if GENERATINGPOWERPC || defined(powerc) || defined (__powerc)
  133. #pragma options align=reset
  134. #endif
  135.  
  136. #ifdef __cplusplus
  137. }
  138. #endif
  139.